﻿using Konves.Scripture;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Konves.Scripture.Data;

namespace Konves.Scripture.Tests
{
    
    
    /// <summary>
    ///This is a test class for Repository_AccessorTest and is intended
    ///to contain all Repository_AccessorTest Unit Tests
    ///</summary>
    [TestClass()]
    public class Repository_AccessorTest
    {
        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion

        /// <summary>
        ///A test for Repository_Accessor Constructor
        ///</summary>
        [TestMethod()]
        public void Repository_AccessorConstructorTest()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
        }

        /// <summary>
        ///A test for GetBookName
        ///</summary>
        [TestMethod()]
        public void GetBookNameTest()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            string abbr = "gen";
            string expected = "Genesis";
            string actual;
            actual = target.GetBookName(abbr);
            Assert.AreEqual(expected, actual);
        }
        ///// <summary>
        /////A test for GetBookName
        /////</summary>
        //[TestMethod()]
        //public void GetBookNameTest()
        //{
        //    Repository target = new Repository();
        //    string abbr = "lev";
        //    string expected = "Leviticus";
        //    string actual;
        //    actual = target.GetBookName(abbr);
        //    Assert.AreEqual(expected, actual);
        //}


        /// <summary>
        ///A test for GetBookId
        ///</summary>
        [TestMethod()]
        public void GetBookIdTest()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            string abbr = "1th";
            int expected = 52;
            int actual;
            actual = target.GetBookId(abbr);
            Assert.AreEqual(expected, actual);
        }

        ///// <summary>
        /////A test for GetBookId
        /////</summary>
        //[TestMethod()]
        //public void GetBookIdTest()
        //{
        //    Repository target = new Repository(); // TODO: Initialize to an appropriate value
        //    string abbr = "lev";
        //    int expected = 3;
        //    int actual;
        //    actual = target.GetBookId(abbr);
        //    Assert.AreEqual(expected, actual);
        //}

        [TestMethod()]
        public void GetBookInfo_AccessorTest1()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            int bookId = 1;

            //BookInfo_Accessor expected = new BookInfo_Accessor
            BookInfo expected = new BookInfo
            {
                Id=1,
                Name="Genesis"
            };
            //BookInfo_Accessor actual;
            BookInfo actual;
            actual = target.GetBookInfo(bookId);
            Assert.AreEqual(expected, actual);
        }

        ///// <summary>
        /////A test for GetBookInfo
        /////</summary>
        //[TestMethod()]
        //public void GetBookInfoTest()
        //{
        //    Repository target = new Repository();
        //    string abbr = "lev";
        //    BookInfo expected = new BookInfo
        //    {
        //        Id = 3,
        //        Name = "Leviticus"
        //    };
        //    BookInfo actual;
        //    actual = target.GetBookInfo(abbr);
        //    Assert.AreEqual(expected, actual);
        //}

        ///// <summary>
        /////A test for GetBookInfo
        /////</summary>
        //[TestMethod()]
        //public void GetBookInfoTest1()
        //{
        //    Repository target = new Repository();
        //    int bookId = 3;
        //    BookInfo expected = new BookInfo
        //    {
        //        Id = 3,
        //        Name = "Leviticus"
        //    };
        //    BookInfo actual;
        //    actual = target.GetBookInfo(bookId);
        //    Assert.AreEqual(expected, actual);
        //}

        [TestMethod()]
        public void GetBookInfo_AccessorTest2()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            string abbr = "Gen";
            //BookInfo_Accessor expected = new BookInfo_Accessor
            BookInfo expected = new BookInfo
            {
                Id = 1,
                Name = "Genesis"
            };
            //BookInfo_Accessor actual;
            BookInfo actual;
            actual = target.GetBookInfo(abbr);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void GetBookInfo_AccessorTest3()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            string abbr = "Genesis";
            //BookInfo_Accessor expected = new BookInfo_Accessor
            BookInfo expected = new BookInfo
            {
                Id = 1,
                Name = "Genesis"
            };
            //BookInfo_Accessor actual;
            BookInfo actual;
            actual = target.GetBookInfo(abbr);
            Assert.AreEqual(expected, actual);
        }


        #region GetMaxChapterTest
        [TestMethod()]
        public void GetMaxChapterTest()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            int bookId = 1;
            int expected = 50;
            int actual;
            actual = target.GetMaxChapter(bookId);
            Assert.AreEqual(expected, actual);
        }
        
        ///// <summary>
        /////A test for GetMaxChapter
        /////</summary>
        //[TestMethod()]
        //public void GetMaxChapterTest()
        //{
        //    Repository target = new Repository(); // TODO: Initialize to an appropriate value
        //    int bookId = 1;
        //    int expected = 50;
        //    int actual;
        //    actual = target.GetMaxChapter(bookId);
        //    Assert.AreEqual(expected, actual);
        //}

        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void GetMaxChapterTest_OutOfRange1()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            int bookId = 0;
            int actual;
            actual = target.GetMaxChapter(bookId);
        }
        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void GetMaxChapterTest_OutOfRange2()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            int bookId = 74;
            int actual;
            actual = target.GetMaxChapter(bookId);
        } 
        #endregion

        #region GetMaxVerseTest
        [TestMethod()]
        public void GetMaxVerseTest()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            int bookId = 16; // nehemiah
            int chapter = 11;
            int expected = 36;
            int actual;
            actual = target.GetMaxVerse(bookId, chapter);
            Assert.AreEqual(expected, actual);
        }
        ///// <summary>
        /////A test for GetMaxVerse
        /////</summary>
        //[TestMethod()]
        //public void GetMaxVerseTest()
        //{
        //    Repository target = new Repository();
        //    int bookId = 3;
        //    int chapter = 21;
        //    int expected = 24;
        //    int actual;
        //    actual = target.GetMaxVerse(bookId, chapter);
        //    Assert.AreEqual(expected, actual);
        //}
        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void GetMaxVerseTest_Chapter_OutOfRange1()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            int bookId = 16; // nehemiah
            int chapter = 14; // max is 13
            int actual;
            actual = target.GetMaxVerse(bookId, chapter);
        }
        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void GetMaxVerseTest_Chapter_OutOfRange2()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            int bookId = 16; // nehemiah
            int chapter = 0;
            int actual;
            actual = target.GetMaxVerse(bookId, chapter);
        }
        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void GetMaxVerseTest_BookId_OutOfRange1()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            int bookId = 0;
            int chapter = 14;
            int actual;
            actual = target.GetMaxVerse(bookId, chapter);
        }
        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void GetMaxVerseTest_BookId_OutOfRange2()
        {
            //Repository_Accessor target = new Repository_Accessor();
            Repository target = new Repository();
            int bookId = 75; // too large
            int chapter = 1;
            int actual;
            actual = target.GetMaxVerse(bookId, chapter);
        } 
        #endregion

        //#region GetVerseTest_Optimistic
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_First_Normal()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = "b"
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_First_BadBook()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "not a book";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_First_BookOnly()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = -1;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 2746,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 1,
        //        VerseNumber = 1,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_First_NoVerse()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 2831,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 1,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_First_ChapterTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5000;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 3604,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 27,
        //        VerseNumber = 34,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_First_VerseTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 5000;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_Last_Normal()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = "b"
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_Last_BadBook()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "not a book";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_Last_BookOnly()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = -1;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 3604,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 27,
        //        VerseNumber = 34,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_Last_NoVerse()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_Last_ChapterTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5000;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 3604,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 27,
        //        VerseNumber = 34,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Optimistic_Last_VerseTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 5000;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Optimistic;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //#endregion

        //#region GetVerseTest_Safe
        //[TestMethod()]
        //public void GetVerseTest_Safe_First_Normal()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = "b"
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_First_BadBook()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "not a book";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_First_BookOnly()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = -1;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = new Verse
        //    {
        //        Index = 2746,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 1,
        //        VerseNumber = 1,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_First_NoVerse()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = new Verse
        //    {
        //        Index = 2831,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 1,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_First_ChapterTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5000;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_First_VerseTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 5000;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_Last_Normal()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = "b"
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_Last_BadBook()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "not a book";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_Last_BookOnly()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = -1;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = new Verse
        //    {
        //        Index = 3604,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 27,
        //        VerseNumber = 34,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_Last_NoVerse()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_Last_ChapterTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5000;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Safe_Last_VerseTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 5000;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Safe;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //#endregion

        //#region GetVerseTest_Strict
        //[TestMethod()]
        //public void GetVerseTest_Strict_First_Normal()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = "b"
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_First_BadBook()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "not a book";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_First_BookOnly()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = -1;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = new Verse
        //    {
        //        Index = 2746,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 1,
        //        VerseNumber = 1,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_First_NoVerse()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = new Verse
        //    {
        //        Index = 2831,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 1,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_First_ChapterTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5000;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_First_VerseTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 5000;
        //    string suffix = null;
        //    VersePosition position = VersePosition.First;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_Last_Normal()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = "b"
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_Last_BadBook()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "not a book";
        //    int chapter = 5;
        //    int verse = 19;
        //    string suffix = "b";
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_Last_BookOnly()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = -1;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = new Verse
        //    {
        //        Index = 3604,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 27,
        //        VerseNumber = 34,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_Last_NoVerse()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = new Verse
        //    {
        //        Index = 2849,
        //        BookName = "Leviticus",
        //        BookId = 3,
        //        ChapterNumber = 5,
        //        VerseNumber = 19,
        //        Suffix = null
        //    };
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_Last_ChapterTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5000;
        //    int verse = -1;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //[TestMethod()]
        //public void GetVerseTest_Strict_Last_VerseTooLarge()
        //{
        //    Repository_Accessor target = new Repository_Accessor();
        //    string book = "lev";
        //    int chapter = 5;
        //    int verse = 5000;
        //    string suffix = null;
        //    VersePosition position = VersePosition.Last;
        //    RepositoryMode mode = RepositoryMode.Strict;
        //    Verse expected = null;
        //    Verse actual;
        //    actual = target.GetVerse(book, chapter, verse, suffix, position, mode);
        //    Assert.AreEqual(expected, actual);
        //}
        //#endregion
    }
}
